
angular.module('starter.controllers', [])
 	.controller('AppController', function($scope, $rootScope, $state,$ionicModal, $ionicHistory, $ionicPopup, Page, ApiEndpoint,sessionStore) {
	
	 $scope.backGo = function (){
         $ionicHistory.goBack();
     };
     
    /* $.ajax({
    	url : ApiEndpoint.url + 'external/user.do',
        method: 'POST',
        async: false,
        success : function(response){
        	if(response.resultCode == '1'){
		        if(response.data && response.data!=''){
		       		$rootScope.user = response.data;
		       		sessionStore.setObject('alipay_user', response.data);
		        }else{
		        	$rootScope.user = sessionStore.getObject('alipay_user');
		        }
            }
    	}
 	});*/
     
    $rootScope.backCardInfo = function(){
    	//AlipayJSBridge.call('exitApp');
    	AlipayJSBridge.call('closeWebview');
    };
     
});

